using System;
using UnityEngine;
using UnityEditor;
using UnityEditor.Graphs;

public class LStudyShaderGUI : ShaderGUI
{
    static float TOLERANCE = 0.001f;
    public override void OnGUI(MaterialEditor m, MaterialProperty[] properties)
    {
        //var _UseAlphaPow = ShaderGUI.FindProperty("_UseAlphaPow", properties);
        //var _AlphaPow = ShaderGUI.FindProperty("_AlphaPow", properties);

        //m.ShaderProperty(_UseAlphaPow, _UseAlphaPow.displayName);
        //if (Mathf.Abs(_UseAlphaPow.floatValue - 1) < TOLERANCE)
        //{
        //    m.ShaderProperty(_AlphaPow, _AlphaPow.displayName);
        //}
        //base.OnGUI(m, properties);

        m.RenderQueueField();

#if UNITY_5_6_OR_NEWER
        m.EnableInstancingField();
        Material material = (Material)m.target;
        material.enableInstancing = true;
#endif
    }
}
